]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
loginDialog: Reset auth prompt on vt switch before fade in
authorRay Strode <rstrode@redhat.com>
Mon, 27 Jul 2020 14:58:49 +0000 (10:58 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 27 Jul 2020 20:18:44 +0000 (16:18 -0400)
At the moment, if a user switches to the login screen vt,
the login screen fades in whatever was on screen prior, and
then does a reset.

It makes more sense to reset first, so we fade in what the
user is going to interact with instead of what they interacted
with before.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2997
js/gdm/loginDialog.js

index 46ddc51f57637dc81e720f6f0ff67f0011828edf..9acb01c6879299e7e2d9816b57f91cb852a05c20 100644 (file)
@@ -953,16 +953,15 @@ var LoginDialog = GObject.registerClass({
         if (this.opacity == 255 && this._authPrompt.verificationStatus == AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
             return;
 
+        if (this._authPrompt.verificationStatus !== AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
+            this._authPrompt.reset();
+
         this._bindOpacity();
         this.ease({
             opacity: 255,
             duration: _FADE_ANIMATION_TIME,
             mode: Clutter.AnimationMode.EASE_OUT_QUAD,
-            onComplete: () => {
-                if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
-                    this._authPrompt.reset();
-                this._unbindOpacity();
-            },
+            onComplete: () => this._unbindOpacity(),
         });
     }